<?php
namespace Web\Controller;
class PageController extends CommonController {
    /**
     * 单页详情
     *
     * @param    void
     * @return    void
    **/
    public function index(){
        $this->layout = 'page';
        $pageid = I('get.id');
        v($pageid,'notEmpty','页面不存在');

        $pageInfo = M('Page')->where("id={$pageid} AND sid=" . C('sid'))->find();
        v($pageInfo,'notEmpty','页面不存在');

        $pageList = M('Page')->where("status = 1 AND sid=" . C('sid'))->field('id,title')->select();

        $this->assign(array(
            'pageid'    =>  $pageid,
            'pageInfo'  =>  $pageInfo,
            'pageList'  =>  $pageList,
        ));
        $this->display();
    }

    public function detail() {
    
    }
}
